package com.era.act.dis;

import java.util.List;

import com.era.srv.NewsSrv;
import com.opensymphony.xwork2.ActionSupport;

public class NewsAction extends ActionSupport {

	private NewsSrv newsSrv;
	private List techInfoList;
	private List milInfoList;
	private List entertainmentInfoList;
	private List sportsInfoList;
	private List topTenList;
	private List recentList;
	private List findList;
	private String title;
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public NewsSrv getNewsSrv() {
		return newsSrv;
	}

	public void setNewsSrv(NewsSrv newsSrv) {
		this.newsSrv = newsSrv;
	}
	
	public List getTechInfoList() {
		return techInfoList;
	}

	public void setTechInfoList(List techInfoList) {
		this.techInfoList = techInfoList;
	}
	

	public List getMilInfoList() {
		return milInfoList;
	}

	public void setMilInfoList(List milInfoList) {
		this.milInfoList = milInfoList;
	}

	public List getSportsInfoList() {
		return sportsInfoList;
	}

	public void setSportsInfoList(List sportsInfoList) {
		this.sportsInfoList = sportsInfoList;
	}

	public List getEntertainmentInfoList() {
		return entertainmentInfoList;
	}

	public void setEntertainmentInfoList(List entertainmentInfoList) {
		this.entertainmentInfoList = entertainmentInfoList;
	}

	public List getTopTenList() {
		return topTenList;
	}

	public void setTopTenList(List topTenList) {
		this.topTenList = topTenList;
	}
	
	public List getRecentList() {
		return recentList;
	}

	public void setRecentList(List recentList) {
		this.recentList = recentList;
	}
	
	public List getFindList() {
		return findList;
	}

	public void setFindList(List findList) {
		this.findList = findList;
	}
	public String execute() throws Exception{
		findList=newsSrv.getNews(title);
		topTenList=newsSrv.getTopTen();
		recentList=newsSrv.getRescentNews();
		techInfoList=newsSrv.getNews(4);
		milInfoList=newsSrv.getNews(3);
		entertainmentInfoList=newsSrv.getNews(2);
		sportsInfoList=newsSrv.getNews(1);
		return SUCCESS;	
	}

	
	
}
